package cc.rengu.igas.bomp.common.enums;

import cc.rengu.oltp.utility.util.StringUtil;

/**
 * @version 1.0
 * @date 2019/08/15
 */
public enum WechatImageTypeEnum {
    SCHOOL_QUALIFICATION_PROOF("SCHOOL_QUALIFICATION_PROOF", "W0", "学校资质证明"),
    COOPERATION_QUALIFICATION_PROOF("COOPERATION_QUALIFICATION_PROOF", "W1", "合作资质证明"),
    ACTIVITY_RATE_COMMITMENT("ACTIVITY_RATE_COMMITMENT", "W2", "优惠费率承诺函"),
    CANTEEN_ENVIRONMENT_PHOTO("CANTEEN_ENVIRONMENT_PHOTO", "W3", "食堂内部用餐环境照片"),
    CANTEEN_FRONT_PHOTO("CANTEEN_FRONT_PHOTO", "W4", "食堂门头照片"),
    SCHOOL_LICENSE_PROOF("SCHOOL_LICENSE_PROOF", "W5", "办学许可证"),
    QUALIFICATION_PROOF("QUALIFICATION_PROOF", "W6", "机构资质证明"),
    STORE_TENANCY_PROOF("STORE_TENANCY_PROOF", "W7", "门店租赁相关证明"),
    STORE_DOOR_PHOTO("STORE_DOOR_PHOTO", "W8", "门头照片"),

    ADDITIONAL_MATERIAL("", "WZ", "特殊费率活动申请补充材料"),

    ;

    public static String getEpayImageType(String wechatImageType) {
        if (StringUtil.isEmptyOrNull(wechatImageType)) {
            return null;
        }
        for (WechatImageTypeEnum wechatImageTypeEnum : WechatImageTypeEnum.values()) {
            if (wechatImageTypeEnum.getWechatImageType().equals(wechatImageType)) {
                return wechatImageTypeEnum.getEpayImageType();
            }
        }
        return null;
    }

    public static String getWechatImageType(String epayImageType) {
        if (StringUtil.isEmptyOrNull(epayImageType)) {
            return null;
        }
        for (WechatImageTypeEnum wechatImageTypeEnum : WechatImageTypeEnum.values()) {
            if (wechatImageTypeEnum.getEpayImageType().equals(epayImageType)) {
                return wechatImageTypeEnum.getWechatImageType();
            }
        }
        return null;
    }

    private String wechatImageType;
    private String epayImageType;
    private String desc;

    public String getWechatImageType() {
        return wechatImageType;
    }

    public String getEpayImageType() {
        return epayImageType;
    }

    public String getDesc() {
        return desc;
    }

    WechatImageTypeEnum(String wechatImageType, String epayImageType, String desc) {
        this.wechatImageType = wechatImageType;
        this.epayImageType = epayImageType;
        this.desc = desc;
    }

}
